package com.chris.dubboconsumer;

import com.chris.dubbo.api.IHelloService;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class DubboConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(DubboConsumerApplication.class, args);
    }
    @Reference
    private IHelloService helloService;

    @Bean
    public ApplicationRunner runner(){
        return args->System.out.println(helloService.sayHello("chris"));
    }
}
